翻訳と辞書
Words near each other
・ Sigi Regency
・ Sigi Renz
・ Sigi Schmid
・ Sigi Schwab
・ Sigi Wimala
・ Sigi Ziering
・ Sigiełki
・ Sigifred of Lucca
・ Sigifredo López
・ Sigifredo Mercado
・ Sigifredo Nájera Talamantes
・ Sigikid
・ Sigil
・ Sigil (application)
・ Sigil (comics)
Sigil (computer programming)
・ Sigil (Dungeons & Dragons)
・ Sigil (magic)
・ Sigil Games Online
・ Sigil of Baphomet
・ Sigillaria
・ Sigillaria (ancient Rome)
・ Sigilliclystis
・ Sigilliclystis kendricki
・ Sigillictystis encteta
・ Sigillictystis insigillata
・ Sigillictystis lunifera
・ Sigillo
・ Sigillo rosso
・ Sigillography


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Sigil (computer programming) : ウィキペディア英語版
Sigil (computer programming)
In computer programming, a sigil ( or ; plural ''sigilia'' or ''sigils'') is a symbol attached to a variable name, showing the variable's datatype or scope, usually a prefix, as in $foo, where $ is the sigil.
''Sigil'', from the Latin ''sigillum'', meaning a "little sign", means ''a sign or image supposedly having magical power''.〔(【引用サイトリンク】url=http://www.collinsdictionary.com/dictionary/english/sigil )〕 In 1999 Philip Gwyn adopted the term "to mean the funny character at the front of a Perl variable".
== Historical context ==

The use of sigils was popularized by the BASIC programming language. The best known example of a sigil in BASIC is the dollar sign ("$") appended to the names of all strings. Many BASIC dialects use other sigils (like "%") to denote integers and floating point numbers and their precision, and sometimes other types as well.
Larry Wall adopted shell scripting's use of sigils for his Perl programming language. However, as Perl is a dynamically typed language, the sigils specify not fine-grained data-types like strings and integers, but the more general categories of scalars (using a prefixed "$"), arrays (using "@"), hashes (using "%"), and subroutines (using "&"). Perl 6 introduces secondary sigils, or twigils,〔("Perl 6 variables:Twigils" ), Perl 6 Documentation〕 to indicate the scope of variables. Prominent examples of twigils in Perl 6 include "^", used with self-declared formal parameters ("placeholder variables"), and ".", used with object attribute accessors (i.e., instance variables).
In CLIPS, scalar variables are prefixed with a "?" sigil while multifield (i.e. a 1-level list) variables are prefixed with "$?".
In Common Lisp, special variables (with dynamic scope) are typically surrounded with
*
in what is dubbed the “earmuff convention”. While this is only convention, and not enforced, the language itself adopts the practice (e.g.,
*standard-output
*). Similarly, some programmers surround constants with +.
In CycL, variables are prefixed with a "?" sigil.〔http://www.cyc.com/cycdoc/ref/cycl-syntax.html#variables〕 Similarly, constant names are prefixed with "#$" (pronounced "hash-dollar").〔http://www.cyc.com/cycdoc/ref/cycl-syntax.html#constant%20names〕
In Elixir, string sigils are provided via the "~" symbol.
In MAPPER (aka BIS), named variables are prefixed with "<" and suffixed with ">" because strings or character values do not require quotes.
In mIRC script, identifiers have a "$" sigil, while all variables have a "%" prefixed (regardless of local or global variables or data type). Binary variables are prefixed by an "&".
In the MUMPS programming language, "$" precedes intrinsic function names and 'special variable names' (built-in variables for accessing the execution state). "$Z" precedes non-standard intrinsic function names. "$$" precedes extrinsic function names. Routines (used for procedures, subroutines, functions) and global variables (database storage) are prefixed by a caret (^). The last global variable subtree may be referenced indirectly by a caret and the last subscript; this is referred to as a "naked reference". System-wide routines and global variables (stored in certain shared database(s)) are prefixed with ^%; these are referred to as "percent routines" and "percent globals".
In Objective-C, string literals preceded with "@" are instances of the object type NSString or, since clang v3.1 / LLVM v4.0, NSNumber, NSArray or NSDictionary. The prefix-@ is also used on the keywords interface, implementation, and end to express the structure of class definitions. Within class declarations and definitions as well, a prefix of - is used to indicate member methods and variables, while prefix + indicates class elements.
In the PHP language, which was largely inspired by Perl, "$" precedes any variable name. Names not prefixed by this are considered constants, functions or class names (or interface or trait names, which share the same namespace as classes).
In Ruby, ordinary variables lack sigils, but "$" is prefixed to global variables, "@" is prefixed to instance variables, and "@@" is prefixed to class variables. Ruby also uses (strictly conventional) suffix sigils: "?" indicates a predicate method returning (usually) a boolean value; and "!" indicates that the method is "not safe", often having a side effect.
In Scheme, by convention, the names of procedures that always return a boolean value usually end in "?". Likewise, the names of procedures that store values into parts of previously allocated Scheme objects (such as pairs, vectors, or strings) usually end in "!".
Standard ML uses the prefix sigil "'" on a variable that refers to a type. If the sigil is doubled, it refers to a type for which equality is defined. The "'" character may also appear within or at the end of a variable, in which case it has no special meaning.
In Transact-SQL, "@" precedes a local variable or parameter name. System variables (known as global variables) are distinguished by a "@@" prefix.
In Windows PowerShell, which was partly inspired by Unix shells and Perl, variable names are prefixed by the "$" sigil.
In XSLT, variables and parameters have a leading "$" sigil on use, although when defined in or with the "name" attribute, the sigil is not included. Related to XSLT, XQuery uses the "$" sigil form both in definition and in use.

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Sigil (computer programming)」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.